package cn.fjsay.java.demo2;

public class PersonTest {
    public static void main(String[] args) {
        Person person = new Person();

        // 访问私有属性name
        // 编译错误：name has private access in Person
        // System.out.println(person.name);

        // 访问受保护属性age
        System.out.println("Age: " + person.age);

        // 访问weight
        System.out.println("Weight: " + person.weight);

        // 访问公共height
        System.out.println("Height: " + person.height);
    }
}
